package com.kitty.web.controller;


import com.kitty.game.attribute.config.Attribute;
import com.kitty.game.config.Equip;
import com.kitty.game.config.NewPetSet;
import com.kitty.web.controller.BaseController;
import com.kitty.web.core.page.TableDataInfo;
import com.kitty.web.system.info.service.IZhuangbeiInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * 装备信息Controller
 * 
 * @author soul
 * @date 2020-05-10
 */
@Controller
@RequestMapping("/system/info")
public class ZhuangbeiInfoController extends BaseController
{
    private String prefix = "system/info";

    @Autowired
    private IZhuangbeiInfoService zhuangbeiInfoService;

    /**
     * 查询装备信息列表
     */

    @PostMapping("/list")
    @ResponseBody
    public TableDataInfo list(Equip equip)
    {
        List<Equip> list = zhuangbeiInfoService.selectZhuangbeiInfoList(equip);
        return getDataTable(list);
    }

    /**
     * 查询基础属性列表
     */

    @PostMapping("/sol")
    @ResponseBody
    public TableDataInfo sol(Attribute attribute)
    {
        List<Attribute> list = zhuangbeiInfoService.selectGameAttributeList(attribute);
        return getDataTable(list);
    }

    /**
     * 查询基础属性列表
     */

    @PostMapping("/pet")
    @ResponseBody
    public TableDataInfo pet(NewPetSet newPetSet)
    {
        List<NewPetSet> list = zhuangbeiInfoService.selectPPetsetList(newPetSet);
        return getDataTable(list);
    }

    /**
     * 查询基础属性列表
     */

    @PostMapping("/findPet")
    @ResponseBody
    public TableDataInfo selectPetset(NewPetSet newPetSet)
    {
        List<NewPetSet> list = zhuangbeiInfoService.selectPetset(newPetSet);
        return getDataTable(list);
    }

}
